<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head>
<title>后台管理</title>
</head>
  <body>
  <nav class="navbar navbar-inverse" th:fragment="header">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>                        
      </button>
      <a class="navbar-brand" href="#">蜀唯文化资源后台系统</a>
    </div>
    <div class="collapse navbar-collapse" id="myNavbar">
      <ul class="nav navbar-nav">
          <li><a href="#" th:href="@{/admin/company}" sec:authorize = "hasAuthority('admin')">公司信息管理</a></li>
            <li><a href="#" th:href="@{/admin/user}" sec:authorize = "hasAuthority('admin')">用户管理</a></li>
            <li><a href="#" th:href="@{/admin/category}" sec:authorize= "hasAuthority('manager')" >分类管理</a></li>
            <li><a href="#" th:href="@{/admin/resource}">资源管理</a></li>
            <li><a href="#" th:href="@{/admin/provider}" >供应商管理</a></li>
          </ul>
          <ul class="nav navbar-nav navbar-right" th:if="${#authorization.expression('isAuthenticated()')}">
            <li>
              <a href="/admin/user/id" th:href="@{'/admin/user/'}"> 欢迎 <span sec:authentication="name">Bob</span> </a>
            </li>
            <li>
              <a href="/logout" th:href="@{/admin/logout}"> <span class="glyphicon glyphicon-log-out"></span> &nbsp;退出</a>
            </li>
          </ul>
    </div>
  </div>
</nav>
</body>
</html>